﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/jui.Master" Inherits="System.Web.Mvc.ViewPage<Dictionary<string, object>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    广告图添加
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="layout" class="noNavTab">
        <div id="navTab">
            <div class="pageContent">
                <%using (Html.BeginEditForm(Database.Default, "Base_AdvImg", 1, "/AdvImg/Edit/1"))
                  { %>
                <div class="pageFormContent nowrap" layouth="56">
                    <dl>
                        <dt>图片1-1：</dt>
                        <dd>
                            <input type="hidden" name="t0_Img1" id="t0_Img1" value="<%=StaticHelper.GetModelValue(Model, "Img1") %>" />
                            <input type="button" value="选择图片" id="btnUpload1" />
                            <div id="showUrl1">
                                <% if (!string.IsNullOrEmpty(StaticHelper.GetModelValue(Model, "Img1").ToString()))
                                   {%>
                                <img src="<%="/" + StaticHelper.GetModelValue(Model, "Img1") %>" />
                                <%} %>
                            </div>
                        </dd>
                        <dd><%= Html.TextArea("t0_Info1", StaticHelper.GetModelValue(Model, "Info1").ToString()
                            , new { @cols = "90", @rows = "10", @class = "KEditor" })%></dd>
                    </dl>
                    <dl>
                        <dt>图片1-2：</dt>
                        <dd>
                            <input type="hidden" name="t0_Img2" id="t0_Img2" value="<%=StaticHelper.GetModelValue(Model, "Img2") %>" />
                            <input type="button" value="选择图片" id="btnUpload2" />
                            <div id="showUrl2">
                                <% if (!string.IsNullOrEmpty(StaticHelper.GetModelValue(Model, "Img2").ToString()))
                                   {%>
                                <img src="<%="/" + StaticHelper.GetModelValue(Model, "Img2") %>" />
                                <%} %>
                            </div>
                        </dd>
                        <dd><%= Html.TextArea("t0_Info2", StaticHelper.GetModelValue(Model, "Info2").ToString()
                            , new { @cols = "90", @rows = "10", @class = "KEditor" })%></dd>
                    </dl>
                    <dl>
                        <dt>图片1-3：</dt>
                        <dd>
                            <input type="hidden" name="t0_Img3" id="t0_Img3" value="<%=StaticHelper.GetModelValue(Model, "Img3") %>" />
                            <input type="button" value="选择图片" id="btnUpload3" />
                            <div id="showUrl3">
                                <% if (!string.IsNullOrEmpty(StaticHelper.GetModelValue(Model, "Img3").ToString()))
                                   {%>
                                <img src="<%="/" + StaticHelper.GetModelValue(Model, "Img3") %>" />
                                <%} %>
                            </div>
                        </dd>
                        <dd><%= Html.TextArea("t0_Info3", StaticHelper.GetModelValue(Model, "Info3").ToString()
                            , new { @cols = "90", @rows = "10", @class = "KEditor" })%></dd>
                    </dl>
                    <dl>
                        <dt>图片1-4：</dt>
                        <dd>
                            <input type="hidden" name="t0_Img4" id="t0_Img4" value="<%=StaticHelper.GetModelValue(Model, "Img4") %>" />
                            <input type="button" value="选择图片" id="btnUpload4" />
                            <div id="showUrl4">
                                <% if (!string.IsNullOrEmpty(StaticHelper.GetModelValue(Model, "Img4").ToString()))
                                   {%>
                                <img src="<%="/" + StaticHelper.GetModelValue(Model, "Img4") %>" />
                                <%} %>
                            </div>
                        </dd>
                        <dd><%= Html.TextArea("t0_Info4", StaticHelper.GetModelValue(Model, "Info4").ToString()
                            , new { @cols = "90", @rows = "10", @class = "KEditor" })%></dd>
                    </dl>
                    <dl>
                        <dt>图片1-5：</dt>
                        <dd>
                            <input type="hidden" name="t0_Img5" id="t0_Img5" value="<%=StaticHelper.GetModelValue(Model, "Img5") %>" />
                            <input type="button" value="选择图片" id="btnUpload5" />
                            <div id="showUrl5">
                                <% if (!string.IsNullOrEmpty(StaticHelper.GetModelValue(Model, "Img5").ToString()))
                                   {%>
                                <img src="<%="/" + StaticHelper.GetModelValue(Model, "Img5") %>" />
                                <%} %>
                            </div>
                        </dd>
                        <dd><%= Html.TextArea("t0_Info5", StaticHelper.GetModelValue(Model, "Info5").ToString()
                            , new { @cols = "90", @rows = "10", @class = "KEditor" })%></dd>
                    </dl>
                    <dl>
                        <dt>图片1-6：</dt>
                        <dd>
                            <input type="hidden" name="t0_Img6" id="t0_Img6" value="<%=StaticHelper.GetModelValue(Model, "Img6") %>" />
                            <input type="button" value="选择图片" id="btnUpload6" />
                            <div id="showUrl6">
                                <% if (!string.IsNullOrEmpty(StaticHelper.GetModelValue(Model, "Img6").ToString()))
                                   {%>
                                <img src="<%="/" + StaticHelper.GetModelValue(Model, "Img6") %>" />
                                <%} %>
                            </div>
                        </dd>
                        <dd><%= Html.TextArea("t0_Info6", StaticHelper.GetModelValue(Model, "Info6").ToString()
                            , new { @cols = "90", @rows = "10", @class = "KEditor" })%></dd>
                    </dl>
                    <dl class="nowrap">
                        <dt>&nbsp;&nbsp; </dt>
                        <dd>
                            <button type="submit">
                                保存</button>
                        </dd>
                    </dl>
                    <%} %>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">
    <link href="/content/jui-normal.css" rel="stylesheet" type="text/css" />
        <link href="/content/colorbox.css" rel="stylesheet" type="text/css" />
    <script src="/scripts/jquery.colorbox.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            createUpload('btnUpload1', 't0_Img1', 'Dest_Img_Max_1', function () {
                if ($('#t0_Img1').val() != '') {
                    $('#showUrl1').html('<img src="/' + $('#t0_Img1').val().replace('~', '') + '"/><a href="?" class="delImg1">删除</a>');
                    $('.delImg1', $('#showUrl1')).click(function () {
                        $('#showUrl1').html('');
                        $('#t0_Img1').val();
                        return false;
                    })
                }
            });
        });
        $(function () {
            createUpload('btnUpload2', 't0_Img2', 'Dest_Img_Max_1', function () {
                if ($('#t0_Img2').val() != '') {
                    $('#showUrl2').html('<img src="/' + $('#t0_Img2').val().replace('~', '') + '"/><a href="?" class="delImg2">删除</a>');
                    $('.delImg2', $('#showUrl2')).click(function () {
                        $('#showUrl2').html('');
                        $('#t0_Img2').val();
                        return false;
                    })
                }
            });
        });
        $(function () {
            createUpload('btnUpload3', 't0_Img3', 'Dest_Img_Max_1', function () {
                if ($('#t0_Img3').val() != '') {
                    $('#showUrl3').html('<img src="/' + $('#t0_Img3').val().replace('~', '') + '"/><a href="?" class="delImg3">删除</a>');
                    $('.delImg3', $('#showUrl3')).click(function () {
                        $('#showUrl3').html('');
                        $('#t0_Img3').val();
                        return false;
                    })
                }
            });
        });
        $(function () {
            createUpload('btnUpload4', 't0_Img4', 'Dest_Img_Max_1', function () {
                if ($('#t0_Img4').val() != '') {
                    $('#showUrl4').html('<img src="/' + $('#t0_Img4').val().replace('~', '') + '"/><a href="?" class="delImg4">删除</a>');
                    $('.delImg4', $('#showUrl4')).click(function () {
                        $('#showUrl4').html('');
                        $('#t0_Img4').val();
                        return false;
                    })
                }
            });
        });
        $(function () {
            createUpload('btnUpload5', 't0_Img5', 'Dest_Img_Max_1', function () {
                if ($('#t0_Img5').val() != '') {
                    $('#showUrl5').html('<img src="/' + $('#t0_Img5').val().replace('~', '') + '"/><a href="?" class="delImg5">删除</a>');
                    $('.delImg5', $('#showUrl5')).click(function () {
                        $('#showUrl5').html('');
                        $('#t0_Img5').val();
                        return false;
                    })
                }
            });
        });
        $(function () {
            createUpload('btnUpload6', 't0_Img6', 'Dest_Img_Max_1', function () {
                if ($('#t0_Img6').val() != '') {
                    $('#showUrl6').html('<img src="/' + $('#t0_Img6').val().replace('~', '') + '"/><a href="?" class="delImg6">删除</a>');
                    $('.delImg6', $('#showUrl6')).click(function () {
                        $('#showUrl6').html('');
                        $('#t0_Img6').val();
                        return false;
                    })
                }
            });
        });
    </script>
    
     <% = Html.Partial("~/Views/Shared/editor/headEditor.cshtml") %>
</asp:Content>
